<?php
require_once('Tricky_Interface.php');
class Tricky implements Tricky_Interface{
	private $to = array();
	private $req = array();
	private $id = array();

	public function __construct(){
		$this->front = $this->getFront();
	}

	public function action($req){
		$this->front->action($req);
	}

	public function __destruct(){
		$last = TInstances::getLast();
		foreach($last as $object){
			$object->act();
		}
	}

	/* override point */
	protected function getFront(){
		return new TFront();
	}
}
